<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
        }

        .box {
            height: 300px;
            width: 300px;
            margin: 100px auto;
            background: lightblue;
            text-align: center;
            position: relative;
        }

        span {
            position: relative;
            padding-top: 30px;
            font-size: 20px;
            left: 0px;
            top: 30px;
        }

        .today {
            height: 50px;
            width: 50px;
            background: #5EFF5E;
            line-height: 50px;
            text-align: center;
            font-size: 30px;
            color: white;
            position: absolute;
            left: 50%;
            margin-left: -25px;
            bottom: 50%;
            margin-bottom: -25px;
        }

    </style>
    <script>
        window.onload = function () {
            var date = new Date();
            var week = ["星期日", "星期1", "星期2", "星期3", "星期4", "星期5", "星期6"];
            let message = date.getFullYear() + "年" + (date.getMonth() + 1) + "月" + date.getDate() + "日" + "      " + week[date.getDay()];
            // alert(message);
            let da = document.getElementsByClassName("da")[0];
            let today = document.getElementsByClassName("today")[0];
            da.innerHTML = message;
            today.innerHTML = date.getDate();
        };

    </script>
</head>
<body>
<div class="box">
    <span class="da">

    </span>
    <div class="today">

    </div>
</div>
</body>
</html>